﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace HallTimer.Views.Outputpages
{
    /// <summary>
    /// Interaction logic for TimerOutputPage.xaml
    /// </summary>
    public partial class TimerOutputPage : Page
    {
        public TimerOutputPage()
        {
            InitializeComponent();
        }

        public void ChangeTimeValue(int minutes, int seconds) 
        {
            // adding extra zero when only one digit (because of scalable ViewBoxes)
            String minutesOutput = minutes.ToString();
            String secondsOutput = seconds.ToString();
            if (minutesOutput.Length == 1)
            {
                minutesOutput = "0" + minutesOutput;
            }
            if (secondsOutput.Length == 1)
            {
                secondsOutput = "0" + secondsOutput;
            }
            this.minutesLabel.Content = minutesOutput;
            this.secondsLabel.Content = secondsOutput;
        }
    }
}
